<?php

require_once ("LoginHandler.php");
require_once ("Loginview.php");
require_once ("LoginController.php");
require_once ("RegisterHandler.php");
require_once ("Registerview.php");
require_once ("RegisterController.php");
require_once ("Database.php");
require_once ("DBConfig.php");

$db = new Database();
$dbConfig = new DBConfig();

$db->Connect($dbConfig);

$loginHandler = new LoginHandler($db);
$registerHandler = new RegisterHandler($db);

$title = "Test";

$body ="";

	if ($loginHandler->Test()){
		$body .= "Test av loginhandler ok";
	}
	else{
		$body .="Test av loginhandler misslyckades";
	}
	
	
	
	if ($registerHandler->Test($db)){
		$body .= "Test av registerhandler ok";
	}
	else{
		$body .="Test av loginhandler misslyckades";
	}
$db->Close();
 
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<title><?php echo "$title";?></title>
	</head>
		<body>
			<?php echo $body; ?>
		</body>
</html>
